//
//  AnimController.h
//  HelloWorld
//
//  Created by Marius Ibanez on 27/06/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#ifndef HelloWorld_AnimController_h
#define HelloWorld_AnimController_h

#include "cocos2d.h"
#include "Box2D/Box2D.h"


#include <vector>

using namespace cocos2d;

#define PTM_RATIO 32


class BasicCharacterController;

class AnimController
{    
protected:
    CCSprite* mImg;
    BasicCharacterController* mController;
    
    std::vector<CCAction*> mAnimList;
    int anim_act;
public:
    
    CCSprite* getSprite() {return mImg;}
    
    AnimController(BasicCharacterController* controller);
    virtual void update( ccTime dt) = 0;
    
    virtual void PlayAnim(int ANIM_ID);
    b2Body* getBody();
};

class BasicAnimController : public AnimController
{
public:
    enum BASINC_ANIM_LIST
	{
		ANIM_IDLE = 0,
		ANIM_JUMP,
		ANIM_SPRINT_JUMP,
		ANIM_AIR_DOWN,
		ANIM_BREAK,
		ANIM_WALK,
		ANIM_SPRINT,
        
		BASIC_ANIM_COUNT
	};
protected:
    
public:
    
    BasicAnimController(BasicCharacterController* controller);
    virtual void update( ccTime dt);
};


#endif
